package com.springboot.learn.springbootwebflux;

import java.util.List;
import java.util.stream.Stream;

/**
 * @author wtcode
 * @Description
 * @date 2025/4/7 - 9:42
 */
public class learn {

    public static void main(String[] args) {
        Stream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6, 7, 8);
        List<Integer> list = stream.filter(i -> i % 2 == 0).peek(System.out::println).toList();
        System.out.println(list);

    }
}
